//
//  WmcBaseCollectionReusableView.swift
//  YPWatermarkCamera
//
//  Created by 赵新 on 2022/3/28.
//

import UIKit

class WmcBaseCollectionReusableView: UICollectionReusableView {
    // Lifecycle

    public required convenience init() {
        self.init(frame: .zero)
    }

    override init(frame: CGRect) {
        super.init(frame: frame)
        backgroundColor = .white
        config()
        makeUI()
    }

    @available(*, unavailable)
    public required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    deinit {
        WmcLogManager.DebugLog(type: .delloc, log: "CollectionReusableView被释放\(self)")
    }

    // Open

    /// 配置数据的地方
    open func config() {}
    /// 创建和布局UI的地方
    open func makeUI() {}

    // Internal

    lazy var titleLabel: UILabel = {
        let label = UILabel.YP.Create(font: 16.yp.uiFont(weight: .medium), color: UIColor.wmc_grayH5_606066)
        return label
    }()
}
